<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //创建map，map的key 可以是任意类型 map是有序的
        let map = new Map()
        console.log(map)
        //map.set()增加属性 k,v
        map.set('name' ,'lisi').set('age' ,23).set('hobby','daqiu')
        console.log(map)
        //map.delete 删除
        map.delete('hobby')
        console.log(map)
        //map.clear 清空
        // map.clear()
        // console.log(map)
        //map.has 判断是否有某值
        console.log(map.has('name'))
        //有迭代器接口，可以for-of 枚举
        for(let item of map ){
            console.log(item)
        }

    </script>
</body>
</html>